package com.wxd.modules.function.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wxd.annotation.ExcelColumn;
import com.wxd.validator.group.AddGroup;
import com.wxd.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 招聘需求
 */
@Data
@TableName("recruit_need")
public class RecruitNeedEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 招聘ID
     */
    @TableId(type = IdType.ID_WORKER)
    private Long id;
    /**
     * 部门ID
     */
    @NotNull(message = "部门不能为空",groups = {AddGroup.class, UpdateGroup.class})
    public Long deptId;
    /**
     * 部门名称
     */
    @TableField(exist = false)//当前属性不是数据库的字段，但在项目中必须使用
    private String deptName;

    @NotNull(message = "招聘人数不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Integer needNum;

    @NotBlank(message = "招聘类型不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private String post;

    @NotBlank(message = "要求学历不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private String education;

    @NotNull(message = "工作时间不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Integer workTime;

    private String demand;
    @NotNull(message = "状态不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Integer status;

    private Long recruitUserId;
    @TableField(exist = false)
    private String recruitName;

    private Long needUserId;

    @TableField(exist = false)
    private String needName;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateTime;

}
